import request from '@/utils/request'

// 查询订单信息列表
export function listOrder(query) {
  return request({
    url: '/business/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单信息详细
export function getOrder(id) {
  return request({
    url: '/business/order/' + id,
    method: 'get'
  })
}

// 新增订单信息
export function addOrder(data) {
  return request({
    url: '/business/order',
    method: 'post',
    data: data
  })
}

// 修改订单信息
export function updateOrder(data) {
  return request({
    url: '/business/order',
    method: 'put',
    data: data
  })
}

// 删除订单信息
export function delOrder(id) {
  return request({
    url: '/business/order/' + id,
    method: 'delete'
  })
}

export function batchPayment(id) {
  return request({
    url: '/business/order/batchPayment?ids=' + id,
    method: 'post'
  })
}


// 操作店铺信息
export function orderOperate(query) {
  return request({
    url: '/business/order/operate',
    method: 'post',
    params: query
  })
}
// 操作店铺信息
export function batchShipOrderOperate(data) {
  return request({
    url: '/business/order/batchShipmentOperate',
    method: 'post',
    // params: query
    data: data
  })
}

// 操作店铺信息
export function updateRemarkOperate(data) {
  return request({
    url: '/business/order/updateRemarkOperate',
    method: 'post',
    data: data
  })
}
